package com.eastfair.imaster.hystrix;

import com.eastfair.imaster.api.CompanyServiceFeign;
import com.eastfair.imaster.dto.CompanyDTO;
import com.eastfair.imaster.dto.CompanySaveDTO;
import com.eastfair.imaster.dto.ProductSaveDTO;
import com.eastfair.imaster.dto.ProductUpdateDTO;
import com.eastfair.imaster.entity.Company;
import com.eastfair.imaster.entity.Employee;
import com.eastfair.imaster.entity.Product;
import com.eastfair.imaster.vo.CompanyVo;
import com.eastfair.core.base.R;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 用户API熔断
 *
 * @author zuihou
 * @date 2019/07/23
 */
@Component
public class CompanyApiFallback implements CompanyServiceFeign {
    @Override
    public CompanyVo findById(Long id) {
        return null;
    }

    @Override
    public List<Company> queryByIds(CompanyDTO companyDTO) {
        return null;
    }

    @Override
    public R<Product> saveCompany(CompanySaveDTO companySaveDTO) {
        return R.timeout();
    }

    @Override
    public R<Employee> getEmployeeById(Long id) {
        return R.timeout();
    }

    @Override
    public R<Product> getProductById(Long id) {
        return R.timeout();
    }

    @Override
    public R<Product> saveProduct(ProductSaveDTO product) {
        return R.timeout();
    }

    @Override
    public R<Product> updateProduct(ProductUpdateDTO product) {
        return R.timeout();
    }

    @Override
    public R test(Long id) {
        return R.timeout();
    }
}
